<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>一个都没有</title>
    {% include "./iosMeta.html" %}
    {% include "../components/importVue.html" %}
    {% include "../components/importVant.html" %}
    <link
        rel="stylesheet"
        href="/public/oneisall/index.s.css"
    />
    <style>
        #app {
            width: 100vw !important;
            min-height: 100vh !important;
            overflow: hidden;
        }
        #app .more {
            padding-top: 0 !important;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="more">
            {% include "./OldVolsComponent.html" %}
        </div>
    </div>
    <script>
        const { createApp, ref, onMounted, computed } = Vue

        const app = createApp({
            setup() {

                const backToday = () => {
                    window.location.href = '/oneisall'
                }
                const ymdList = ref(JSON.parse('{{ ymdListJson | safe }}'))

                const asyncToday = () => {
                    fetch('/oneisall/sync').then(async res => {
                        vant.showToast('同步成功，即将刷新')
                        setInterval(() => {
                            window.location.reload()
                        }, 500)
                    })
                }

                return {
                    backToday,
                    ymdList,
                    asyncToday
                }
            }
        })

        app.config.compilerOptions.delimiters = ['@{', '}']

        app.use(vant)
        app.use(vant.Lazyload)
        app.mount('#app')
    </script>
</body>

</html>